package com.cmcc.qx.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.Logger;

public class ConfProperties {

	private static final Logger logger = Logger.getLogger(ConfProperties.class);
	public static boolean blockWhenExhausted;

	static {
		Properties configuration = new Properties();
		InputStream in = null;
		try {
			in = ConfProperties.class
					.getResourceAsStream("/config/conf.properties");
			configuration.load(in);
			blockWhenExhausted = Boolean.parseBoolean(configuration.getProperty("blockWhenExhausted"));
		} catch (Exception e) {
			logger.error("读取redis.properties配置文件失败", e);
		} finally {
			if (in != null) {
				try {
					in.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
	}

}
